package y24.m3;

import javax.swing.*;
public class Test12 {
    private static final String GREEK_ALPHABET = "αβγδεζηθικλμνξοπρστυφχψω";
    public static void main(String[] args) {
        JFrame frame = new JFrame("希腊字母表");
        JTextArea textArea = new JTextArea(20, 20);
        JScrollPane scrollPane = new JScrollPane(textArea);
        textArea.setEditable(false); // 设置为不可编辑
        StringBuilder sb = new StringBuilder("希腊字母表：\n");
        char alpha = 'α';
        for (char c : GREEK_ALPHABET.toCharArray()) {
            sb.append(alpha).append(" - ").append(c).append("\n");
            alpha++;
        }
        textArea.setText(sb.toString());
        frame.add(scrollPane);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
}